<!DOCTYPE html>
<html xmlns:th="http://www.w3.org/1999/xhtml">
<head>
    <meta charset="utf-8">
    <meta name="viewport" content="width=device-width, initial-scale=1.0">
<!--    <meta http-equiv="Content-Security-Policy" content="default-src 'self'; img-src https://*; child-src 'none';">-->
    <title>百度ECHarts</title>
    <meta name="keywords" content="">
    <meta name="description" content="">
    <link rel="shortcut icon" href="favicon.ico">
    <link href="/css/layui.css" rel="stylesheet">
    <link href="/css/bootstrap.min.css?v=3.3.6" rel="stylesheet">
    <link href="/css/font-awesome.css?v=4.4.0" rel="stylesheet">
    <link href="/css/animate.css" rel="stylesheet">
    <link href="/css/style.css?v=4.1.0" rel="stylesheet">
</head>
<style>
    .red{font-weight: bold;color: #FF5722}
</style>
<body class="gray-bg">
<div class="row  border-bottom white-bg dashboard-header">
    <div class="col-sm-12">
        <p>欢迎 <span th:text="${name}" style="font-size: 22px"></span>，你的所属机构为
            <span th:text="${orgName}" style="font-size: 22px"></span>
            ，你的角色为<span th:text="${roleNames}" id="roleNames" style="font-size: 22px"></span>
        </p>
    </div>

</div>
<div class="wrapper wrapper-content animated fadeInRight">
    <div class="row" id="info">
        <!---->
    </div>
    <div class="row">
        <div class="col-sm-12">
            <div class="ibox float-e-margins">
                <div class="ibox-title">
                    <h5>待办任务</h5>
                    <div class="ibox-tools">
                        <a class="collapse-link">
                            <i class="fa fa-chevron-up"></i>
                        </a>
                        <!--<a class="dropdown-toggle" data-toggle="dropdown" href="graph_flot.html#">-->
                        <!--<i class="fa fa-wrench"></i>-->
                        <!--</a>-->
                        <!--<a class="close-link">-->
                        <!--<i class="fa fa-times"></i>-->
                        <!--</a>-->
                    </div>
                </div>
                <div class="ibox-content">
                    <div class="layui-form">
                        
                        <table class="layui-table" id="t1">
                            <thead>
                            <tr class="layui-bg-green">
                                <th>任务名称</th>
                                <th>总数</th>
                                <th>待审核数</th>
                                <th>操作</th>
                            </tr>
                            </thead>
                            <tbody th:if="${stuNoReview ==0 && expNoReview ==0 && orgNoReview ==0}">
                            <tr> <td colspan="4">暂无任务</td></tr>
                            </tbody>
                            <tbody  th:else>
                            <tr th:if="${stuNoReview !=0}">
                                <td>考生报名信息</td>
                                <td th:text="${stuAllNum}"></td>
                                <td class="red" th:text="${stuNoReview}"></td>
                                <td><a class="J_menuItem" href="/jzweb/stuSignUp">去处理</a></td>
                            </tr>
                            <tr th:if="${expNoReview !=0}">
                                <td>专家信息</td>
                                <td th:text="${orgAllNum}"></td>
                                <td class="red" th:text="${expNoReview}"></td>
                                <td><a class="J_menuItem" href="/jzweb/experts">去处理</a></td>
                            </tr>
                            <tr th:if="${orgNoReview !=0}">
                                <td>机构信息</td>
                                <td th:text="${expAllNum}"></td>
                                <td class="red" th:text="${orgNoReview}"></td>
                                <td><a class="J_menuItem" href="/jzweb/organizationRoles">去处理</a></td>
                            </tr>
                            <tr  th:if="${eroomNoReview !=0}">
                                <td>考场信息</td>
                                <td th:text="${eroomAllNum}"></td>
                                <td class="red" th:text="${eroomNoReview}"></td>
                                <td><a class="J_menuItem" href="/jzweb/examinationRoom">去处理</a></td>
                            </tr>
                            <tr>
                            </tbody>
                        </table>
                        <table class="layui-table" id="t2">
                            <thead>
                            <tr class="layui-bg-green">
                                <th>任务名称</th>
                                <th>总数</th>
                                <th>操作</th>
                            </tr>
                            </thead>
                            <tbody>
                            <tr th:if="${stuNoReview !=0}">
                                <td>考生报名信息</td>
                                <td th:text="${stuAllNum}"></td>
                                <td><a class="J_menuItem" href="/jzweb/stuSignUp">去处理</a></td>
                            </tr>
                            <tr>
                                <td>考场</td>
                                <td th:text="${eroomAllNum}"></td>
                                <td><a class="J_menuItem" href="/jzweb/examinationRoom">去处理</a></td>
                            </tr>
                            </tbody>
                        </table>
                        <table class="layui-table" id="t3">
                            <tr>
                                <td>暂无任务</td>
                            </tr>
                        </table>
                        <table class="layui-table" id="t4">
                            <tr>
                                <td><a class="J_menuItem" style="text-decoration:underline" href="/jzweb/recruitmentNews">发布招聘信息</a></td>
                            </tr>
                        </table>
                    </div>
                </div>
            </div>
        </div>
    </div>
</div>
<!-- 全局js -->
<!--<script src="/js/jquery.min.js?v=2.1.4"></script>-->
<!--<script src="/js/bootstrap.min.js?v=3.3.6"></script>-->

<script src="/js/jquery-3.7.0.min.js?v=2.1.4"></script>
<script src="/js/jQueryMigrate-v3.4.0.js?=v=2.1.4"></script>
<script src="/js/bootstrap.min.js?v=3.3.6"></script>

<!-- 自定义js -->
<script src="/js/content.js?v=1.0.0"></script>
<!--<script type="text/javascript" src="/js/contabs.js"></script>-->
<script>
    var roleNames =$("#roleNames").text();
    if(roleNames.indexOf("超级用户角色") > -1){
        $("#t1").show();
        $("#t2").hide();
        $("#t3").hide();
    }else if(roleNames.indexOf("考核站点") > -1){
        $("#t1").hide();
        $("#t2").show();
        $("#t3").hide();
    }else{
        $("#t1").hide();
        $("#t2").hide();
        $("#t3").show();
    }

    $(function () {
        $.ajax({
            url:'/earning',
            type:'POST',
            success:function (r) {
                console.log("rrr = " , r);
                if (r.code == 0){
                    var info = '<div class="col-sm-3" >' +
                        '            <div class="ibox float-e-margins">' +
                        '                <div class="ibox-title">' +
                        '                    <span class="label label-success pull-right">日</span>' +
                        '                    <h5>当日收入（元）</h5>' +
                        '                </div>' +
                        '                <div class="ibox-content">' +
                        '                    <h1 class="no-margins" id="result">'+r.data.capitalDay+'</h1>' +
                        '                </div>' +
                        '            </div>' +
                        '        </div>' +
                        '        <div class="col-sm-3">' +
                        '            <div class="ibox float-e-margins">' +
                        '                <div class="ibox-title">' +
                        '                    <span class="label label-info pull-right">总</span>' +
                        '                    <h5>总收入（元）</h5>' +
                        '                </div>' +
                        '                <div class="ibox-content">' +
                        '                    <h1 class="no-margins" id="result2">'+r.data.capitalCount+'</h1>' +
                        '                </div>' +
                        '            </div>' +
                        '        </div>';
                    $('#info').html(info);
                }
            }
        })
    })

</script>
</body>

</html>
